﻿#ifndef URLLINEEDIT_H
#define URLLINEEDIT_H

#include <QWidget>
#include <QUrl>
#include <QString>
#include "ui_urllineedit.h"

namespace Ui {
class URLLineEdit;
}

class URLLineEdit : public QWidget
{
    Q_OBJECT

public:
    explicit URLLineEdit(QWidget *parent = nullptr);
    ~URLLineEdit();

    QLineEdit *urlLineInput(){
        return ui->urlLineInput;
    }

    QPushButton *urlSafeCheckBtn(){
        return ui->urlSafeCheckBtn;
    }

    QPushButton *urlCollectBtn(){
        return ui->urlCollectBtn;
    }

    QPushButton *urlHttps(){
        return ui->urlHttps;
    }

    void urlInputUpdate(QUrl url);

signals:
    // 输入栏回车
    void pressUrlInputLine(QUrl url);
    void markUrl(QString str);
    void unMarkUrl(QString str);

private slots:
    void on_urlSafeCheckBtn_clicked();

    void on_urlCollectBtn_clicked();

private:
    Ui::URLLineEdit *ui;

};

#endif // URLLINEEDIT_H
